FUNCTION: 25H SET INTERRUPT VECTOR DESCRIPTION: Changes a specified interrupt vector to point to another interrupt handling routine; before calling this function, call function 35H to get the present vector and save it; restore that vector using this function when your program ends; not required for INTs 22H, 23H and 24H which are automatically restored by MS-DOS. CALL: AH = 25H AL = interrupt number DS:DX = Segment:Offset of new interrupt handling routine RETURNS: Nothing SEE ALSO: Function 35H$ FUNCTION: 26H CREATE PROGRAM SEGMENT PREFIX DESCRIPTION: Copies the program segment prefix (PSP) of the current program to a specified segment in memory and updates the new PSP to make it usable by another program; the need for this function was obviated by function 4BH (Execute Program) for MS-DOS 2.0 and later. CALL: AH = 26H DX = Segment of new PSP RETURNS: Nothing SEE ALSO: Function 4BH$ FUNCTION: 30H GET MS-DOS VERSION NUMBER DESCRIPTION: Returns the version number of the installed MS-DOS operating system; if 0 returned in AL, MS-DOS version 1 is installed; if this is unacceptable to the program, care must be taken to terminate the program using function calls consistent with this version - INT 20H or function 0 of INT 21H. CALL: AH = 30H RETURNS: AL = major version number (e.g. Version 3.1 returns 3 in AL) AH = minor version number (e.g. Version 3.1 returns 0AH in AH)$ FUNCTION: 33H GET OR SET CTL-BREAK FLAG DESCRIPTION: Returns or sets the state of the system's Ctl-Break or Ctl-C checking flag; this flag is system-wide, so before changing it the current state should be returned, saved and then restored when the program is terminated; function can be used to prevent user breaks into critical parts of a program. CALL: AH = 33H if getting the flag AL = 0 is setting the flag AL = 01 DL = 00 to toggle Ctl-Break checking off DL = 01 to toggle, Ctl-Break checking on RETURNS: if getting the flag DL = 00 if Ctl-Break checking is off 01 if Ctl-Break checking is on if setting the flag Nothing$ FUNCTION: 35H GET INTERRUPT VECTOR DESCRIPTION: Returns the address of the current interrupt handler for a specified interrupt; generally used prior to function 25H call to get and save the current handler address. CALL: AH = 35H AL = interrupt number RETURNS: ES:BX = Segment:Offset of current interrupt handling routine SEE ALSO: Function 25H$ FUNCTION: 38H GET OR SET COUNTRY DESCRIPTION: Returns or sets country code; see reference book for futher information.$ FUNCTION: 44H DEVICE DRIVER CONTROL (IOCTL) DESCRIPTION: Passes information between a program and a device driver; see a manual for more complete information. CALL: AH = 44H AL = 00 get driver control data = 01 set driver control data = 02 read from device control channel to buffer (character) = 03 write from buffer to device control channel (character) = 04 same as 02, but use drive number in BL (block) = 05 same as 03, but use drive number in BL (block) = 06 get input status = 07 get output status = 08 test if block device has changeable media (eg floppy) = 09 network call to test if device is local or remote = 0Ah network call to test whether handle is remote or local = 0BH network call to change sharing retry count and delay BX = handle for codes 00, 01, 02, 03, 06, 07 or 0AH = number of retries for code 0BH BL = drive code (0=default, 1=A, etc) for codes 04, 05, 08 or 09 CX = number of bytes to read or write for codes 02, 03, 04 or 05 = delay between retries for code 0BH DS:DX = Segment:Offset of buffer for codes 02 through 05 ANY KEY FOR MORE - PRIOR MENU TO EXIT@ CALL:(contd) DX = device data word for code 01 (set DH=0 when calling) DX BIT MAPPING FOR CODES 00 AND 01 BIT VALUE FOR CHARACTER DEVICE FOR DISK FILE 15 0 Reserved Reserved 14(Rd Only) 1 if can process control strings Reserved sent with code 02 and 03 8 - 13 Reserved Reserved 7 1 / 0 handle refers to a device / refers to disk file 6 0 / 0 if end of file on input / file has been written 5 1 does not recognize ^P, ^C, ^Q, ^S | bits 0 - 5 represent 0 recognizes above control chars | drive number 4 Reserved | 0 = A, 1 = B, etc. 3 1 if CLOCK device | 2 1 if NUL device | 1 1 if console output | 0 1 if console input RETURNS: if successful Carry Flag = Clear AX = number of bytes transferred if code 02 - 05 called AL = status if code 06 or 07 called = 0 if not ready = 0FFh if ready ANY KEY FOR MORE - PRIOR PAGE - PRIOR MENU TO EXIT@ RETURNS:(contd) AX = value if code 08 called = 0 removable media = 1 fixed media DX = device data word - code 00 (bit mapping above) if unsuccessful Carry Flag = Set AX = error code 1 if invalid function number 4 if invalid handle 5 if access denied 6 if invalid handle or not open 0DH if invalid data 0FH if invalid drive number - PRIOR MENU FOR PRIOR PAGE TO EXIT$ FUNCTION: 4BH EXECUTE PROGRAM DESCRIPTION: Loads and executes a specified program (child) from within another program (parent); when child terminates, control is passed back to parent; child's return code can be accessed using function 4DH; sufficient memory must be made available by the parent to satisfy the child's requirements; all registers except CS:IP are destroyed, so SS:SP must be saved and then restored by the parent; child inherits all open handles of the parent; certain information must be passed to child by means of a parameter block; can be used to 'shell out' by spawning another copy of COMMAND.COM; can also be used to load an overlay. CALL: AH = 4BH AL = 00 if loadinng and executing a program = 03 if loading an overlay DS:DX = Segment:Offset of ASCIIZ program (overlay) name ANY KEY FOR MORE - PRIOR MENU TO EXIT@ CALL(contd): ES:BX = Segment:Offset of program parameter block PARAMETER BLOCK MAP BYTE LOAD AND EXECUTE PROGRAM LOAD OVERLAY 0 - 1 Segment of environemnt passed to child; Load segment address set to 00, to use parent's environment. 2 - 5 Segment:Offset of command line passed to Relocation factor for child; must have command line length as .EXE files first byte and as last. 6 - 9 Segment:Offset of 1st FCB passed to child Nothing 0AH - 0DH Segment:Offset of 2nd FCB passed to child Nothing RETURNS: if function successful Carry Flag = Clear if function unsuccessful Carry flag = Set AX = error code 1 if invalid function 2 if file not found or invalid path 5 if access denied 8 if insufficient memory to load 0AH if invalid environment 0BH if invalid format - PRIOR MENU FOR PRIOR PAGE TO EXIT$ FUNCTION: 4DH GET RETURN CODE DESCRIPTION: Used by a parent after a successful completion of function 4BH (load and execute a program) to get the return code of the child. CALL: AH = 4DH RETURNS: AH = exit type 00 if normal termination 01 if terminated by Ctl-C 02 if terminated by critical error 03 if terminated and stayed resident (function 31H) AL = return code (passed by child through function 4CH)$ FUNCTION: 59H GET EXTENDED ERROR INFORMATION DESCRIPTION: Obtains information after unsuccessful INT 21H call CALL: AH = 59H BX = 0 RETURNS: AX = extended error code (0-no error) 1-invalid function 2-file not found 3-path not found 4-too many open files 5-access denied 6-invalid handle 7-MCB destroyed 8-insufficient memory 9-invalid MCB 0AH-invalid environment 0BH-invalid format 0CH-invalid access code 0DH-invalid data 0EH-RESERVED 0FH-invalid drive 10H-remove current directory 11H-not same device 12H-no more files 13H-write protected 14H-unknown unit 15H-drive not ready 16H-unknown command 17H-CRC error 18H-bad request structure 19H-seek error 1AH-unknown medium type 1BH-sector not found 1CH-printer out of paper 1DH-write fault 1EH-read fault 20H-sharing violation 21H-lock violation 22H-disk change invalid 23H-FCB unavailable 24-4FH-RESERVED 50H-file already exists 51H-RESERVED 52H-cannot make directory 53H-fail on INT 24H ANY KEY FOR MORE - PRIOR MENU TO EXIT@ RETURNS(contd): BH = error class 1 out of resource 2 temporary situation 3 authorization problem 4 internal error in system software 5 hardware failure 6 system software failure 7 application program error 8 file or item not found 9 file or item in invalid format 0AH file or item iterlocked 0BH storage medium problem 0CH other error BL = recommended action 1 retry reasonable number of tries 2 delay between each retry 3 get corrected user input 4 abort with clean up 5 abort with no clean up 6 ignore 7 retry after user intervention CH = error locus 1 unknown 2 block device 2 network related 4 serial device 5 memory related - PRIOR MENU FOR PRIOR PAGE TO EXIT$ FUNCTION: 62H GET PROGRAM SEGMENT PREFIX ADDRESS (PSP) DESCRIPTION: Returns the segment of the PSP for the current program. CALL: AH = 62H RETURNS: BX = segment of current program's program segment prefix$ FUNCTION: 29H PARSE FILENAME DESCRIPTION: Parses a text string to extract the various fields of a file control block (FCB); for details relating to the performance of this function, see a reference book CALL: AH = 29H AL = flags to control parsing DS:SI = Segment:Offset of ASCIIZ text string ES:DI = Segment:Offset of unopened file control block RETURNS: AL = 00 if no wildcards were found 01 if wildcards were found 0FFH if drive specifier invalid DS:SI = Segment:Offset of first character after parsed filename ES:DI = Segment:Offset of formatted unopened file control block$ FUNCTION: 53H SUBFUNCTION 00 GET MACHINE NAME SUBFUNCTION 02 SET PRINTER SETUP SUBFUNCTION 03 GET PRINTER SETUP DESCRIPTION: Subfunction 00 returns an ASCIIZ string identifying the local computer; the total string length is 16 bytes long; Microsoft Networks must be running to use this function. CALL: AH = 5EH AL = 00 DS:DX = Segment:Offset of buffer to receive string RETURNS: if successful Carry Flag = Clear CX = identification number of local computer DS:DX = Segment:Offset of local computer name if unsuccessful Carry Flag = Set AX = error code 1 Networks not running ANY KEY FOR NEXT SUBFUNCTION - PRIOR MENU TO QUIT@ DESCRIPTION: Subfunction 02 specifies a setup string to be sent before any file is sent to a particular networked printer; allows each user to specify an individualized mode on the same printer; Microsoft Networks must be running to use this function. CALL: AH = 5EH AL = 02 BX = printer assign list index (gotten from function 5F02H) CX = setup string length DS:SI = Segment:Offset of setup string RETURNS: if successful Carry Flag = Clear if unsuccessful Carry Flag = Set AX = error code 1 if invalid function call ANY KEY FOR MORE - PRIOR PAGE - PRIOR MENU TO QUIT@ DESCRIPTION: Subfunction 03 returns the current printer setup string from a network printer; Microsoft Networks must be running to use this function. CALL: AH = 5EH AL = 03 BX = assign list index (gotten from function 5F02H) ES:DI = Segment:Offset of buffer for returned string RETURNS: if successful Carry Flag = Clear CX = length of printer setup string ES:DI = Segment:Offset of buffer holding string if unsuccessful Carry Flag = Set AX = error code 1 if invalid function call - PRIOR PAGE - PRIOR MENU TO QUIT$ FUNCTION: 5FH SUBFUNCTION 02 GET ASSIGN LIST ENTRY SUBFUNCTION 03 MAKE ASSIGN LIST ENTRY SUBFUNCTION 04 CANCEL ASSIGN LIST ENTRY DESCRIPTION: Subfunction 02 returns information pertaining to a specified entry in the system assign list; this list associates device names with network files, directories or printers; Microsoft Networks must be running to use this function. CALL: AH = 5FH AL = 02 BX = assign list index DS:SI = Segment:Offset of 16 byte buffer for local name ES:DI = Segement:Offset of 128 byte buffer for remote name RETURNS: if successful Carry Flag = Clear BH = device status flag BL = device type bit 0 = 0 if device valid 3 if printer 1 if device invalid 4 if drive CX = stored parameter DS:SI = address of ASCIIZ local device name ES:DI = address of ASCIIZ network name if unsuccessful Carry Flag = Set AX = error code 1 if invalid function code 12H if no more entries ANY KEY FOR NEXT SUBFUNCTION - PRIOR MENU TO QUIT@ DESCRIPTION: Subfunction 03 redirects a local device (printer or disk drive) to a network directory; Microsoft Networks must be running to use this function. CALL: AH = 5FH AL = 03 BL = device type 3 if printer 4 if drive CX = parameter to save for caller DS:SI = Segment:Offset of ASCIIZ local device name ES:DI = Segment:Offset of ASCIIZ network name and ASCIIZ password RETURNS: if successful Carry Flag = Clear if unsuccessful Carry Flag = Set AX = error code 1 if invalid function code if incorrect string format if device already redirected 3 if path not found 5 if access denied 8 if insufficient memory ANY KEY FOR MORE - PRIOR PAGE - PRIOR MENU TO QUIT@ DESCRIPTION: Subfunction 04 cancels a previous redirection by removing the association of the local device name from the network name; Microsoft Networks must be running to use this function. CALL: AH = 5FH AL = 04 DS:SI = Segment:Offset of ASCIIZ local device name RETURNS: if successful Carry Flag = Clear if unsuccessful Carry Flag = Set AX = error code 1 if invalid function code if no match found for ASCIIZ string 0FH if device paused on server - PRIOR PAGE - PRIOR MENU TO QUIT$ FUNCTION: 2AH GET SYSTEM DATE DESCRIPTION: Returns the current system date - year, month, day, day of week - expressed as binary numbers. CALL: AH = 2AH RETURNS: CX = year (1980 thru 2099) DH = month (1 = January ... 12 = December) DL = day (1 to 31) AL = day of week (0 = Sunday, 6 = Saturday)$ FUNCTION: 2BH SET SYSTEM DATE DESCRIPTION: Sets the system date - year, month, day. CALL: AH = 2BH CX = year (1980 thru 2099) DH = month (1 = January ... 12 = December) DL = day (1 to 31) RETURNS: AL = 0 if successful 0FFH if invalid date$ FUNCTION: 2CH GET SYSTEM TIME DESCRIPTION: Returns the current system time - hours, minutes, seconds, hundredths - expressed as binary numbers. CALL: AH = 2CH RETURNS: CH = hours (0 - 23) CL = minutes (0 - 59) DH = seconds (0 - 59) DL = hundredths (0 - 99)$ FUNCTION: 2DH SET SYSTEM TIME DESCRIPTION: Sets the current system time - hours, minutes, seconds, hundredths. CALL: AH = 2DH CH = hours (0 - 23) CL = minutes (0 - 59) DH = seconds (0 - 59) DL = hundredths (0 - 99) RETURNS: AL = 0 if successful 0FF if invalid time$ FUNCTION: 00H PROGRAM TERMINATE DESCRIPTION: One of several methods to terminate a program; flushes all file buffers to disk; restores exit addresses; other methods of terminating a program are preferred. CALL: AH = 0 CS = PSP segment RETURNS: Nothing SEE ALSO: Functions 4CH and 31H$ FUNCTION: 4CH PROGRAM TERMINATE WITH RETURN CODE DESCRIPTION: Terminates a program returning control to a parent or COMMAND. COM and passes back a return code; restores termination handler vector from PSP:000AH, restores Ctl-Break vector from PSP:000EH, restores critical error handler vector form PSP:0012H, flushes all buffers, closes all files with active handles and transfers to the termination handler address; parent can get return code by calling function 4DH; approved way to terminate a program. CALL: AH = 4CH AL = return code RETURNS: nothing SEE ALSO: Function 00H, 31H$ FUNCTION: 31H PROGRAM TERMINATE AND STAY RESIDENT DESCRIPTION: Terminates the current program, but does not return all of its assigned memory to MS-DOS; control is passed back to COMMAND.COM; additional memory assigned thru a call to function 48H is not affected; generally used by .COM programs, but with care can be called from .EXE programs; preferred to the use of INT 27H, unless early DOS compatability needed. CALL: AH = 31H AL = return code DX = memory size to reserve (number of 16 byte paragraphs) RETURNS: nothing SEE ALSO: INT 27H$ FUNCTION: 14H SEQUENTIAL READ - FCB DESCRIPTION: Reads the next sequential block of data from a file specified by an open file control block (FCB); writes the block to the disk transfer area (DTA); all information for the read - record size, location, etc. - is obtained from the FCB; updates the appropriate FCB fields. CALL: AH = 14H DS:DX = Segment:Offset of open FCB RETURNS: AL = 00 if successful 01 if end of file encountered 02 if record size will cause DTA segment wrap - canceled 03 if partial record read at the end of the file SEE ALSO: Function 3FH$ FUNCTION: 15H SEQUENTIAL WRITE - FCB DESCRIPTION: Writes data from the disk transfer area (DTA) to the file specified by an open file control block (FCB); data is written to the file location determined by the current block and current record fields; updates the appropriate fields in the FCB. CALL: AH = 15H DS:DX = Segment:Offset of open FCB RETURNS: AL = 00 if successful 01 if disk is full = canceled 02 if record size will cause DTA segment wrap - canceled SEE ALSO: Function 40H$ FUNCTION: 21H RANDOM READ - FCB DESCRIPTION: Reads a record from a specific file into memory; the file is specified by an open file control block (FCB) and the specific record, by the random record field in that FCB; the record is read into the current disk transfer area (DTA); current block and current record fields in the FCB are updated, but the random record field is not changed. CALL: AH = 21H DS:DX = Segment:Offset of an open FCB RETURNS: AL = 00 if successful 01 if end of file encountered 02 if record size will cause DTA segment wrap - canceled 03 if partial record read at the end of the file SEE ALSO: Function 3FH$ FUNCTION: 22H RANDOM WRITE - FCB DESCRIPTION: Writes data from the disk transfer area (DTA) to the file specified by an open file control block (FCB); data is written to the file location specified by the random record field in the FCB; current block and current record fields in the FCB are updated, but the random record field is not changed. CALL: AH = 22H DS:DX = Segment:Offset of an open FCB RETURNS: AL = 00 if successful 01 if disk is full - canceled 02 if record size will cause DTA segment wrap - canceled SEE ALSO: Function 40H$ FUNCTION: 24H SET RANDOM RECORD NUMBER - FCB DESCRIPTION: Sets the random record field of an open file control block (FCB) to correspond with the current block and current record fields of that FCB; use prior to making random read/write calls. CALL: AH = 24H DS:DX = Segment:Offset of an open FCB RETURNS: Random record field of the FCB updated$ FUNCTION: 27H RANDOM BLOCK READ - FCB DESCRIPTION: Reads one or more sequential records from a specific file into memory at the current disk transfer area (DTA); file is specified by an open file control block (FCB); starting point of read is specified by the value in the random record number field in FCB; all pointers are updated by MS-DOS at the end of the read and are left pointing to the next record in the file. CALL: AH = 27H CX = number of records to be read DS:DX = Segment:Offset of open FCB RETURNS: AL = 00 if successful 01 if end of file encountered 02 if record size will cause DTA segment wrap - canceled 03 if partial record read at the end of the file CX = actual number of records read SEE ALSO: Function 21H 3FH$ FUNCTION: 28H RANDOM BLOCK WRITE - FCB DESCRIPTION: Writes one or more sequential records from the disk transfer area (DTA) to a file at a specific record number; file is specified by an open file control block (FCB); starting point of read is specified by the value in the random record number field in FCB; all pointers are updated by MS-DOS at the end of the read and are left pointing to the next record in the file; if call specifies that 0 record be written, MS-DOS extends or truncates the file to the length specified by the random record and record size field. CALL: AH = 28H CX = number of records to write DS:DX = Segment:Offset of open FCB RETURNS: AL = 00 if successful 01 if disk full - canceled 02 if record size will cause DTA segment wrap - canceled CX = actual number of records written SEE ALSO: Function 22H 40H$ FUNCTION: 3FH READ FILE OR DEVICE - HANDLE DESCRIPTION: Reads from the file or device associated with a specified handle; if reading from a character device, such as the standard input (KBD), only one line (up to first carriage return), will be read; if call returns less bytes than specified, then a partial record was read at the end of a file. CALL: AH = 3FH BX = handle CX = number of bytes to read DS:DX = Segment:Offset of buffer area to hold read RETURNS: if successful Carry Flag = Clear AX = number of bytes actually read 0 indicates end of file if unsuccessful Carry Flag = Set AX = error code 5 if access denied 6 if invalid handle$ FUNCTION: 40H WRITE TO FILE OR DEVICE - HANDLE DESCRIPTION: Writes to the file or device associated with a specified handle; if call returns less bytes than specified, then an error was encountered even though Carry Flag was not set; if call is made with 0 bytes specified to be written, then file size is extended or truncated to the value of the file pointer. CALL: AH = 40H BX = handle CX = number of bytes to write DS:DX = Segment:Offset of buffer area to be written RETURNS: if successful Carry Flag = Clear AX = number of bytes actually written 0 indicates full disk if unsuccessful Carry Flag = Set AX = error code 5 if access denied 6 if invalid handle$ FUNCTION: 42H MOVE FILE POINTER - HANDLE DESCRIPTION: Sets the file pointer to a specific file location relative to: 1) the start of the file, 2) the end of the file or, 3) the current location; the next file read or write will begin at that location; care must be exercised not to set the pointer to a location before the start or after the end of the file; file size can be determined by using method 2 with a relative location of 0 and examining the returned pointer. CALL: AH = 42H AL = method code 0 to set the byte offset relative to the start of the file 1 to set the byte offset relative to the current location 2 to set the byte offset relative to the end of the file BX = handle CX = most significant half of offset DX = least significant half of offset ANY KEY FOR MORE - PRIOR MENU TO EXIT@ RETURNS: if successful Carry Flag = Clear DX = most significant half of new pointer AX = least significant half of new pointer (new pointer always relative to start of file) if unsuccessful Carry Flag = Set AX = error code 1 if invalid function number 6 if invalid handle - PRIOR PAGE - PRIOR MENU TO QUIT$ FUNCTION: 5CH RECORD LOCKING - HANDLE DESCRIPTION: Locks or unlocks a specified region of a file in a networking or multitasking environment; locked regions cannot be read or written to; regions must be unlocked prior to termination of the process; all byte offsets are relative to the start of a file; the unlock function must use the same offset and length parameters used in the lock function; requests to access locked regions generate an INT 24H (critical error) for the requesting process. CALL: AH = 5CH AL = function code 00 to lock 01 to unlock BX = handle CX = most significant half of offset of region DX = least significant half of offset of region SI = most significant half of region length DI = least significant half of region length ANY KEY FOR MORE - PRIOR MENU TO EXIT@ RETURNS: if successful Carry Flag = Clear if unsuccessful Carry Flag = Set AX = error code 1 if invalid function code 6 if invalid handle 21H if all/part of region already locked - PRIOR PAGE - PRIOR MENU TO QUIT$ INTERRUPT: 20H PROGRAM TERMINATE DESCRIPTION: Terminates currently operating program and returns control to its parent; closes all files and flushes buffers; cannot be used with .EXE programs; supeseded by INT 21H, function 4CH. CALL: CS = segment of program segment prefix RETURNS: Nothing SEE ALSO: INT 21H - Function 4CH$ INTERRUPT: 25H ABSOLUTE DISK READ DESCRIPTION: Provides direct linkage to MS-DOS BIOS module to read data directly from a specific disk sector into a specified memory location; will destroy all registers except the segment registers; the stack should be cleared upon return from this call as the flags PUSHed before the call, are still there; care must be taken to insure that the parameters are correct since there is very little checking done by the routine; using this interrupt should be avoided if at all possible; use INT 21H functions preferentially. CALL: AL = drive number (0 = A, 1 = B, etc.) CX = number of sectors to read DX = starting relative sector number DS:BX = Segment:Offset of disk transfer area (DTA)@ RETURNS: if successful Carry Flag = Clear if unsuccessful Carry Flag = Set AX = error code 80H if attachment failed to respond 40H if seek operation failed 20H if controller failed 10H if data error (CRC error) 08H if direct memory access (DMA) failure 04H if requested sector not found 03H if write-protect fault 02H if bad address mark 01H if bad command$ INTERRUPT: 26H ABSOLUTE DISK WRITE DESCRIPTION: Provides direct linkage to MS-DOS BIOS module to write data from a specified memory location directly to a specific disk sector; will destroy all registers except the segment registers; the stack should be cleared upon return from this call as the flags PUSHed before the call, are still there; care must be taken to insure that the parameters are correct since there is very little checking done by the routine; using this interrupt should be avoided if at all possible; use INT 21H functions preferentially. CALL: AL = drive number (0 = A, 1 = B, etc.) CX = number of sectors to read DX = starting relative sector number DS:BX = Segment:Offset of disk transfer area (DTA)@ RETURNS: if successful Carry Flag = Clear if unsuccessful Carry Flag = Set AX = error code 80H if attachment failed to respond 40H if seek operation failed 20H if controller failed 10H if data error (CRC error) 08H if direct memory access (DMA) failure 04H if requested sector not found 03H if write-protect fault 02H if bad address mark 01H if bad command$ INTERRUPT: 27H TERMINATE AND STAY RESIDENT DESCRIPTION: Terminates current program, but does not return all its originally allocated memory to MS-DOS; this prevents it from being overlaid by the next transient program loaded; upon termination, control is returned to its parent, generally COMMAND.COM; maximum amount of memory that can be reserved is with a value of 0FFF0H in DX - requests for more than this will result in only 32K being allocated; open files are NOT closed by this call; superseded by INT 21H, function 31H. CALL: DX = offset of last byte of program's code to be protected + 1 CS = segment of program segment prefix RETURNS: Nothing SEE ALSO: INT 21H, Function 31H$ FUNCTION: 18H UNKNOWN DESCRIPTION: CALL: RETURNS: $ FUNCTION: 1DH UNKNOWN DESCRIPTION: CALL: RETURNS: $ FUNCTION: 1EH UNKNOWN DESCRIPTION: CALL: RETURNS: $ FUNCTION: 1FH UNKNOWN DESCRIPTION: CALL: RETURNS: $ FUNCTION: 20H UNKNOWN DESCRIPTION: CALL: RETURNS: $ FUNCTION: 32H GET DRIVE TABLE (Undocumented) DESCRIPTION: Returns Segment:Offset of drive parameter table; if for a floppy, drive must be accessed before using this function. CALL: AH = 32H DX = Drive # (A = 1) RETURNS: DS:BX = Segment:Offset of drive table If AL = 0FFH, not found $ FUNCTION: 34H GET DOS BUSY FLAG (Undocumented) DESCRIPTION: Returns the Segment:Offset of the DOS Busy Flag; this flag is used internally by DOS to indicate that a DOS routine is currently active; if this flag is clear, then it is safe to initiate a service call; commonly used by TSRs to determine when they can pop up. CALL: AH = 34H RETURNS: ES:BX = Segment:Offset of DOS Busy Flag$ FUNCTION: 37H GET OR SET SWITCHAR (Undocumented) DESCRIPTION: The switchar is the character recognized by DOS as preceeding a command line parameter (the '/', by default); this function returns the current switchar or permits a different one to be set; there are other subfunctions whose use is not known. CALL: AH = 34H DL = 00H to return current switchar DL = 01H to set a new switchar RETURNS: if switchar requested DL = switchar$ FUNCTION: 50H SET NEW PSP SEGMENT (Undocumented) DESCRIPTION: Apparently, changes the segment address of the current program segment prefix. CALL: AH = 50H BX = segment of new program segment prefix RETURNS: ?$ FUNCTION: 51H GET CURRENT PROGRAM SEGMENT PREFIX (Undocumented) DESCRIPTION: Returns the segment address of the current program segment prefix CALL: AH = 51H RETURNS: BX = Segment of current program segment prefix$ FUNCTION: 52H GET FIRST MEMORY CONTROL BLOCK (Undocumented) DESCRIPTION: Returns a pointer which is one word past the segment address of the first memory control block (MCB) in DOS's linked list. Also, ES:[BX] is a pointer to drive A information table. CALL: AH = 52H RETURNS: ES:[BX-2] = Segment of first MCB$ FUNCTION: 53H UNKNOWN DESCRIPTION: CALL: RETURNS: $ FUNCTION: 55H CREATE A NEW PROGRAM SEGMENT PREFIX (Undocumented) DESCRIPTION: Creates a new program segment prefix (PSP) at a specified segment address; apparently, that PSP becomes the PSP recognized by DOS as current; assumed that memory has already been allocated by call to proper INT 21H function. CALL: AH = 55H DX = Segment address for new PSP RETURNS: ?$ FUNCTION: 5DH UNKNOWN DESCRIPTION: CALL: RETURNS: $ FUNCTION: 60H UNKNOWN DESCRIPTION: CALL: RETURNS: $ FUNCTION: 61H UNKNOWN DESCRIPTION: CALL: RETURNS: $ INTERRUPT: 28H INTERNAL VECTOR (Undocumented) DESCRIPTION: Generated by DOS during the execution of a prolonged function like 0AH (Buffered Input); during this interrupt, calls to DOS functions higher than 0CH can be made without worrying about re-entrancy problems; this can be used by a resident program to allow it to call disk handling functions; similarly, a resident program awaiting a keystroke can issue this interrupt to allow other resident programs access to DOS. CALL: Nothing$